﻿using System;

namespace DbParallel.Dispatcher.DbInterface
{
	internal struct DbAppSettings
	{
		public readonly int PrimaryInterval;
		public readonly int StandbyInterval;
		public readonly int DegreeOfTaskParallelism;
		public readonly int MaxThreadsInPool;

		public DbAppSettings(int nPrimaryInterval, int nStandbyInterval, int nDegreeOfTaskParallelism, int nMaxThreadsInPool)
		{
			PrimaryInterval = Math.Max(nPrimaryInterval, 50);
			StandbyInterval = Math.Max(nStandbyInterval, 10000);
			DegreeOfTaskParallelism = nDegreeOfTaskParallelism;
			MaxThreadsInPool = nMaxThreadsInPool;
		}
	}
}

////////////////////////////////////////////////////////////////////////////////////////////////////
//
//	Copyright 2012 Abel Cheng
//	This source code is subject to terms and conditions of the Apache License, Version 2.0.
//	See http://www.apache.org/licenses/LICENSE-2.0.
//	All other rights reserved.
//	You must not remove this notice, or any other, from this software.
//
//	Original Author:	Abel Cheng <abelcys@gmail.com>
//	Created Date:		2012-03-23
//	Primary Host:		http://dbParallel.codeplex.com
//	Change Log:
//	Author				Date			Comment
//
//
//
//
//	(Keep clean code rather than complicated code plus long comments.)
//
////////////////////////////////////////////////////////////////////////////////////////////////////
